package com.xiao.common.service;

import com.xiao.common.util.RedisUtils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author xiaoxiaoping
 * @Date 2020/2/4 9:53
 * @Version 1.0
 */
@Service
public class SessionService {
    @Resource
    private RedisUtils redisUtils;

    public Object getSessionUser(String token){
        if(null != redisUtils.get(token)){
            redisUtils.expire(token,10800);
        }
        return redisUtils.get(token);
    }
}
